#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define SIZE 17

int convert(char str[])
{   	 	   
    int i = 0;
    int ret = 0;
    for (i = 0; i < 8; i++)
    {   	 	   
        ret += (str[i] - '0') * pow(2, 7 - i); //1
    }
    return ret;
}   	 	   
int main(void)
{   	 	   
    char Bin[SIZE] = {'0'}; //1
    char temp[9] = {'0'};
    int num[2] = {0};  //1
    int i , j , k ;
    gets(Bin); //1
    for (i = 0, j = 0; i < SIZE - 1; i += 8, j++)
    {   	 	   
        for (k = 0; k < 8; k++)
        {   	 	   
            temp[k] = Bin[j * 8 + k]; //1
        }
        temp[k] = '\0';
        num[j] = convert(temp); //1
    }
    printf("%d#%d", num[0], num[1]); //1
    return 0;
}